package jackson.src.day05;

/*
 * Author: JacksonCoder
 * FileName: demo1
 * Version: 1.0.0
 */
public class demo1 {

    public static int solution(int[] res){
        int result = 0;
        for(int i : res) {
            result ^= i;
            System.out.println("result = " + result);
        }
        return result;
    }

    public static void main(String[] args) {
        // Add your test cases here
        System.out.println(solution(new int[] { 1, 1, 2, 2, 3, 3, 4, 5, 5 }) == 4);  // 1 0 2 0 3 0 4 1 4
        System.out.println(solution(new int[] { 0, 1, 0, 1, 2 }) == 2);
    }
}
